<?php 

$query = db_select('menu_links', 'm') 
  ->condition('m.menu_name', "menu-events-left-menu")
  ->condition('m.has_children', 1)
  ->fields('m', array('link_title', 'menu_name'))
  ->range(0, 50);
  
$result = $query->execute();
foreach ($result as $record) {
  //echo $record->link_title."<br/>";
}
  
 //print_r($query->__toString());
 
 //print_r(menu_get_names());
  
$query = db_select('menu_links', 'm') 
  ->condition('m.plid', 1276) 
  ->condition('m.hidden', 1, '<>') 
  ->fields('m', array('link_title', 'menu_name'))
  ->range(0, 50);
  
$result = $query->execute();
foreach ($result as $record) {
  echo $record->link_title."<br/>";
}
//print_r($query->__toString());
	  
 $menu_tree = menu_tree('menu-events-submenu');  
 $tree = menu_tree_all_data('menu-events-submenu');
 foreach ($tree as $branch){
 	//echo $branch['link']['title']."<br/><br/>";
	if($branch['link']['title'] == "Food & Wine")
	{
		 //print_r($branch['below']); 
		 foreach ($branch['below'] as $branch2){
		  	//echo $branch2['link']['title'];
		 }
	 }
 }
  
  $menu_name = "main-menu";
   
  $active_path = menu_tree_page_data($menu_name); 
?>